<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

  <ui:composition template="/template.xhtml">
    <ui:define name="title">
      <h:outputText value="#{bundle.CreateUserTitle}"></h:outputText>
    </ui:define>
    <ui:define name="body">
      <h:panelGroup id="messagePanel" layout="block">
        <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
      </h:panelGroup>
      <h:form>
        <h:panelGrid columns="2">
          <h:outputLabel value="#{bundle.CreateUserLabel_name}" for="name" />
          <h:inputText id="name" value="#{userController.selected.name}" title="#{bundle.CreateUserTitle_name}" />
          <h:outputLabel value="#{bundle.CreateUserLabel_password}" for="password" />
          <h:inputText id="password" value="#{userController.selected.password}" title="#{bundle.CreateUserTitle_password}" />
          <h:outputLabel value="#{bundle.CreateUserLabel_userRole}" for="userRole" />
          <h:inputText id="userRole" value="#{userController.selected.userRole}" title="#{bundle.CreateUserTitle_userRole}" />
          <h:outputLabel value="#{bundle.CreateUserLabel_created}" for="created" />
          <h:inputText id="created" value="#{userController.selected.created}" title="#{bundle.CreateUserTitle_created}" >
            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
          </h:inputText>
          <h:outputLabel value="#{bundle.CreateUserLabel_id}" for="id" />
          <h:inputText id="id" value="#{userController.selected.id}" title="#{bundle.CreateUserTitle_id}" />
          <h:outputLabel value="#{bundle.CreateUserLabel_updated}" for="updated" />
          <h:inputText id="updated" value="#{userController.selected.updated}" title="#{bundle.CreateUserTitle_updated}" >
            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
          </h:inputText>
          <h:outputLabel value="#{bundle.CreateUserLabel_version}" for="version" />
          <h:inputText id="version" value="#{userController.selected.version}" title="#{bundle.CreateUserTitle_version}" />
        </h:panelGrid>
        <br />
        <h:commandLink action="#{userController.create}" value="#{bundle.CreateUserSaveLink}" />
        <br />
        <br />
        <h:commandLink action="#{userController.prepareList}" value="#{bundle.CreateUserShowAllLink}" immediate="true"/>
        <br />
        <br />
        <h:commandLink value="#{bundle.CreateUserIndexLink}" action="/index" immediate="true" />
      </h:form>
    </ui:define>
  </ui:composition>

</html>
